String Functions – REPLICATE()

I am going to continue my series of very short articles or tidbits on Transaction SQL string functions. I will exploring the REPLICATE() function today. The REPLICATE() function takes a pattern string [S] and a integer replication count [C] as input. The function returns a string composed of pattern string [S] concatenated [C] times to itself as output. The example below replicates a pattern ‘XO’ five times. [crayon-66490bae89435424929397/] [crayon-66490bae8943e669493750/] One thing to always worry about when using TSQL functions is how will it react with a EMPTY strings or NULL … Continue reading String Functions – REPLICATE()